<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box>:first-child {
      color: red;
    }

    .box> :only-child {
      font-size: 20px;
      font-weight: 700;
    }

    .box>span:only-of-type {
      color: purple;
    }

    /* html元素 */
    :root {
      font-size: 30px;
    }

    /* 为空 */
    :empty {
      width: 100px;
      height: 100px;
      background-color: #f00;
    }
  </style>
</head>

<body>
  <div class="box">
    <span>我是span元素</span>
    <div>列表内容1</div>
    <div>列表内容2</div>
    <div>列表内容3</div>
    <div>列表内容4</div>
    <div>列表内容5</div>
  </div>
  <hr>
  <div class="box">
    <div>我是box的div</div>
  </div>
  <hr>
  <div class="box">
    <div>我是box的div</div>
    <span>我是span元素</span>
  </div>
  <hr>
  <div class="box">
    <div>我是box的div</div>
    <div>我是box的div</div>
  </div>
  <hr>
  <div class="container"></div>


</body>

</html>